import scala.swing._

object Webcrawler extends SimpleSwingApplication {
   
    val urlText = new TextField("Type URL here", 80);
    var ON_group= new ButtonGroup

    override def main(args: Array[String]) {super.main(args)}

    def top = new MainFrame {
        title = "cjenkin1's Webcrawler (subject to better name)"

        contents = new TabbedPane{
            pages += new TabbedPane.Page("Main", new BorderPanel{
                import BorderPanel.Position._
                import javax.swing.{SpinnerNumberModel, JSpinner}

                add(urlText, North)

                add(new GridPanel(2,3){
                    contents += new Label("Links to Follow")
                    contents += Component.wrap(
                        new JSpinner(new SpinnerNumberModel(50, 1, Int.MaxValue, 1) )
                    )
                    contents += new Label("Error Msg");

                    //Radio buttons for filtering through URLs
                    var only_never = List(new RadioButton("Only"),new RadioButton("Never"))
                    ON_group.buttons   ++= only_never
                    ON_group.select(only_never(0) )
                    contents += new GridPanel(1,2) {
                        contents ++= only_never
                    }
                    contents += new TextField("")
                    contents += new Label("Semicolon delimits")

                    
                }, Center)
            })
        }
    }
}
